package com.lry.web.video.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("video_update")
public class VideoUpdate {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String videoId;
    private String videoUrl;
    private Integer chapterNum;
    private Date creationTime;
    private Integer videoVariableId;
    @TableLogic
    private Integer deleted;

    public VideoUpdate(String videoId, String videoUrl, Integer chapterNum, Integer videoVariableId){
        this.videoId = videoId;
        this.videoUrl = videoUrl;
        this.videoVariableId = videoVariableId;
        this.chapterNum = chapterNum;
        this.creationTime = new Date();
    }
}
